function getAllRecord() {
    var hr = null;
    $.ajax({
        url: "/recordDO/getAllRecord",
        type: 'GET',
        async:false,
        dataType: "json",
        success: function (data) {
            hr= data;
            for (var i = 0; i < hr.length; i++) {
                var arr = hr[i].positionData.split(',');
                var lat = arr[0].substring(5, arr[0].length)
                var lng = arr[1].substring(4, arr[1].length - 1)

                var geom = "POINT(" + lng + " " + lat + ")";
                hr[i].geom = geom;
            }

        },
        error: function () {

        },

    });
    return hr;
}

function getRecordByType(type) {
    var hr = null;
    $.ajax({
        url: "/recordDO/getRecordByType?type=" + type,
        type: 'GET',
        async:false,
        dataType: "json",
        success: function (data) {
            hr= data;
            for (var i = 0; i < hr.length; i++) {
                var arr = hr[i].positionData.split(',');
                var lat = arr[0].substring(5, arr[0].length);
                var lng = arr[1].substring(4, arr[1].length - 1);

                var geom = "POINT(" + lng + " " + lat + ")";
                hr[i].geom = geom;
            }

        },
        error: function () {

        },

    });
    return hr;
}




